/**
 * @author chenteng
 */
 import request from '@/utils/request'
 /**
 * 新增章节
 */
export function insertChapter(data) {
    return request({
      baseURL: '/API-ENTERPRISE-BACKEND/',
      url: '/backend/courseSubjectRelevance/insertChapter',
      method: 'POST',
      data
    })
  }
  /**
 * 获取分类树
 */
export function getClassifyTree(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/learnClassify/getClassifyTree',
    method: 'post',
    data
  })
}
  /**
 * 获取附件信息
 */
   export function getAttachmentInfo(data) {
    return request({
      baseURL: '/API-ENTERPRISE-BACKEND/',
      url: '/backend/courseSubjectRelevance/getAttachmentInfo',
      method: 'post',
      data
    })
  }
  /**
 * 列表查询
 */
export function fetchList(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/subject/queryPage',
    method: 'POST',
    data
  })
}
/**
 * 分类移动  上移：SY  下移：XY
 */
 export function move(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/courseSubjectRelevance/moveSort',
    method: 'POST',
    data
  })
}
/**
 * 新增练习题
 */
 export function courseInsert(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/courseQuestionBank/insert',
    method: 'POST',
    data
  })
}
/**
 * 新增附件
 */
 export function addAttachment(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/courseSubjectRelevance/addAttachment',
    method: 'POST',
    data
  })
 }
/**
 * 编辑练习题
 */
 export function courseUpdatet(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/courseQuestionBank/update',
    method: 'POST',
    data
  })
}
   /**
 * 编辑章节
 */
export function update(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/courseSubjectRelevance/update',
    method: 'POST',
    data
  })
}
   /**
 * 删除章节
 */
export function deleteById(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/courseSubjectRelevance/deleteById',
    method: 'POST',
    data
  })
}
/**
 * 删除练习题
 */
 export function courseDele(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/courseQuestionBank/deleteById',
    method: 'POST',
    data
  })
}

  /**
 * 获取章节树
 * @param {*} data
 */
export function queryLessonTree(data) {
    return request({
      baseURL: '/API-ENTERPRISE-BACKEND/',
      url: '/backend/courseSubjectRelevance/getChapterTree',
      method: 'post',
      data
    })
  }